package Generator;
import Manage.Counter;
import turrets.*;
import info.gridworld.grid.*;
public class Path extends Terrain{

	public void CreateObstruction(){
		Location loc = new Location(getLocation().getRow(), getLocation().getCol(), getLocation().getDep());
		if (loc != null){
			if (Counter.getMoney() - Obstruction.getPrice() < 0){
				world.OutputMoneyError();
			}
			else{
				Obstruction b = new Obstruction();
				removeSelfFromGrid(getLocation());
				b.putSelfInGrid(getGrid(), loc);
			}
		}
		world.setMessage("Level: " + Generate.getLevel() + "\n" + "Lives: " + Counter.getLives() + "\n" + "Kills: "  + Counter.getKills() + "\n" + "Money: " + Counter.getMoney());
	}
	public void CreateStrongObstruction(){
		Location loc = new Location(getLocation().getRow(), getLocation().getCol(), getLocation().getDep());
		if (loc != null){
			if (Counter.getMoney() - StrongObstruction.getPrice() < 0){
				world.OutputMoneyError();
			}
			else{
				StrongObstruction b = new StrongObstruction();
				removeSelfFromGrid(getLocation());
				b.putSelfInGrid(getGrid(), loc);
			}
		}
		world.setMessage("Level: " + Generate.getLevel() + "\n" + "Lives: " + Counter.getLives() + "\n" + "Kills: "  + Counter.getKills() + "\n" + "Money: " + Counter.getMoney());
	}
}
